package com.easy.query.test.entity.proxy;

import com.easy.query.core.expression.parser.core.available.TableAvailable;
import com.easy.query.core.proxy.AbstractProxyEntity;
import com.easy.query.core.proxy.SQLColumn;
import com.easy.query.core.proxy.SQLSelectAsExpression;
import com.easy.query.core.proxy.fetcher.AbstractFetcher;
import com.easy.query.core.proxy.core.EntitySQLContext;
import com.easy.query.test.entity.TopicTypeTest1;
import com.easy.query.core.proxy.columns.types.SQLStringTypeColumn;
import com.easy.query.core.proxy.columns.types.SQLIntegerTypeColumn;
import com.easy.query.core.proxy.columns.types.SQLAnyTypeColumn;
import com.easy.query.core.proxy.columns.types.SQLLocalDateTimeTypeColumn;

/**
 * this file automatically generated by easy-query, don't modify it
 * 当前文件是easy-query自动生成的请不要随意修改
 * 如果出现属性冲突请使用@ProxyProperty进行重命名
 *
 * @author easy-query
 */
public class TopicTypeTest1Proxy extends AbstractProxyEntity<TopicTypeTest1Proxy, TopicTypeTest1> {

    private static final Class<TopicTypeTest1> entityClass = TopicTypeTest1.class;

    public static final TopicTypeTest1Proxy TABLE = createTable().createEmpty();

    public static TopicTypeTest1Proxy createTable() {
        return new TopicTypeTest1Proxy();
    }

    public TopicTypeTest1Proxy() {
    }

    /**
     * {@link TopicTypeTest1#getId}
     */
    public SQLStringTypeColumn<TopicTypeTest1Proxy> id() {
        return getStringTypeColumn("id");
    }

    /**
     * {@link TopicTypeTest1#getStars}
     */
    public SQLIntegerTypeColumn<TopicTypeTest1Proxy> stars() {
        return getIntegerTypeColumn("stars");
    }

    /**
     * {@link TopicTypeTest1#getTitle}
     */
    public SQLStringTypeColumn<TopicTypeTest1Proxy> title() {
        return getStringTypeColumn("title");
    }

    /**
     * {@link TopicTypeTest1#getTopicType}
     */
    public SQLAnyTypeColumn<TopicTypeTest1Proxy, com.easy.query.test.enums.TopicTypeEnum> topicType() {
        return getAnyTypeColumn("topicType", __cast(Object.class));
    }


    /**
     * {@link TopicTypeTest1#getCreateTime}
     */
    public SQLLocalDateTimeTypeColumn<TopicTypeTest1Proxy> createTime() {
        return getLocalDateTimeTypeColumn("createTime");
    }


    @Override
    public Class<TopicTypeTest1> getEntityClass() {
        return entityClass;
    }

    @Override
    public TopicTypeTest1Proxy createNew() {
        return createTable();
    }


    /**
     * 数据库列的简单获取
     *
     * @return
     */
    public TopicTypeTest1ProxyFetcher FETCHER = new TopicTypeTest1ProxyFetcher(this, null, SQLSelectAsExpression.empty);


    public static class TopicTypeTest1ProxyFetcher extends AbstractFetcher<TopicTypeTest1Proxy, TopicTypeTest1, TopicTypeTest1ProxyFetcher> {

        public TopicTypeTest1ProxyFetcher(TopicTypeTest1Proxy proxy, TopicTypeTest1ProxyFetcher prev, SQLSelectAsExpression sqlSelectAsExpression) {
            super(proxy, prev, sqlSelectAsExpression);
        }


        /**
         * {@link TopicTypeTest1#getId}
         */
        public TopicTypeTest1ProxyFetcher id() {
            return add(getProxy().id());
        }

        /**
         * {@link TopicTypeTest1#getStars}
         */
        public TopicTypeTest1ProxyFetcher stars() {
            return add(getProxy().stars());
        }

        /**
         * {@link TopicTypeTest1#getTitle}
         */
        public TopicTypeTest1ProxyFetcher title() {
            return add(getProxy().title());
        }

        /**
         * {@link TopicTypeTest1#getTopicType}
         */
        public TopicTypeTest1ProxyFetcher topicType() {
            return add(getProxy().topicType());
        }

        /**
         * {@link TopicTypeTest1#getCreateTime}
         */
        public TopicTypeTest1ProxyFetcher createTime() {
            return add(getProxy().createTime());
        }


        @Override
        protected TopicTypeTest1ProxyFetcher createFetcher(TopicTypeTest1Proxy cp, AbstractFetcher<TopicTypeTest1Proxy, TopicTypeTest1, TopicTypeTest1ProxyFetcher> prev, SQLSelectAsExpression sqlSelectExpression) {
            return new TopicTypeTest1ProxyFetcher(cp, this, sqlSelectExpression);
        }
    }


    public static final class Fields {
        public static final String id = "id";
        public static final String stars = "stars";
        public static final String title = "title";
        public static final String topicType = "topicType";
        public static final String createTime = "createTime";

        private Fields() {
        }
    }
}
